import Vue from 'vue'
import Vuex from 'vuex'
import xuzhaofei from './modules/xzf.js'

Vue.use(Vuex)

export default new Vuex.Store({
	state: {
		// 当前用户
		curLoginUser: {},

		// 用户表
		/*
		 * id:用户id
		 * nic:用户昵称
		 * phone:手机号码
		 * sex:性别
		 * name:姓名
		 * pwd:密码
		 * points:积分
		 *
		 */
		users: [{
				id: 1,
				nic: '干饭王杰杰',
				phone: '1',
				pwd: '1',
				sex: '男',
				name: '曾杰',
				points: 1500
			},
			{
				id: 2,
				nic: '干饭王晶晶',
				phone: '1008612',
				sex: '女',
				name: '晶晶',
				pwd: '123456jj',
				points: 10000
			},
			{
				id: 3,
				nic: '干饭王熊熊',
				phone: '10086256',
				sex: '女',
				name: '熊艳玲',
				pwd: '123456xyl',
				points: 1000
			}
		],
		// 商品分类
		/*
		 * id:分类id
		 * cname:分类名称
		 * icon:分类图片
		 */
		category: [{
				id: 1,
				cname: '手机',
				icon: require('../assets/category/phone.jpg')
			},
			{
				id: 2,
				cname: '电脑',
				icon: require('../assets/category/compute.jpg')
			},
			{
				id: 3,
				cname: '相机',
				icon: require('../assets/category/camera.jpg')
			},
			{
				id: 4,
				cname: '音箱',
				icon: require('../assets/category/yinxiang.jpg')
			},
			{
				id: 5,
				cname: '显卡',
				icon: require('../assets/category/xianka.jpg')
			},
			{
				id: 6,
				cname: '鼠标',
				icon: require('../assets/category/mouse.jpg')
			}
		],
		// 商品
		/*
		 * id:商品id int
		 * sname:商品名称 string
		 * cid:商品类别id int
		 * des:商品描述 string
		 * price:商品单价 float
		 * mprice:市场价格 float
		 * pics:商品相册 array
		 */
		commodities: [{
				id: 1,
				sname: '小米10',
				cid: 1,
				des: '【向往的生活同款】小米10青春版 双模5G 骁龙765G 50倍潜望式变焦四摄 8GB+128GB 黑巧风暴游戏手机',
				price: '2099',
				mprice: '2299',
				pics: [
					require('@/assets/commodies/小米10-1.jpg'),
					require('@/assets/commodies/小米10-2.png'),
					require('@/assets/commodies/小米10-3.jpg'),
					require('@/assets/commodies/小米10-4.jpg'),
					require('@/assets/commodies/小米10-5.jpg')
				],
				stock: 500,
				hasSaleNum: 500
			},
			{
				id: 2,
				sname: '小米11',
				cid: 1,
				des: '【向往的生活同款】小米10青春版 双模5G 骁龙765G 50倍潜望式变焦四摄 8GB+128GB 黑巧风暴游戏手机',
				price: '2099',
				mprice: '2299',
				pics: [
					require('@/assets/commodies/小米10-1.jpg'),
					require('@/assets/commodies/小米10-2.png'),
					require('@/assets/commodies/小米10-3.jpg'),
					require('@/assets/commodies/小米10-4.jpg'),
					require('@/assets/commodies/小米10-5.jpg')
				],
				stock: 500,
				hasSaleNum: 500
			},
			{
				id: 3,
				sname: '联想(Lenovo)小新Air14',
				cid: 2,
				des: '2021款性能版轻薄本 英特尔酷睿i5 14英寸全面屏笔记本电脑(i5-1135G7 16G 512G MX450独显 100%sRGB)银',
				price: '5299',
				mprice: '5499',
				pics: [
					require('@/assets/commodies/小新-1.jpg'),
					require('@/assets/commodies/小新-2.jpg'),
					require('@/assets/commodies/小新-3.jpg'),
					require('@/assets/commodies/小新-4.jpg'),
					require('@/assets/commodies/小新-5.jpg')
				],
				stock: 50,
				hasSaleNum: 78
			},
		],
		// 订单表  不用添加数据，下单自动生成
		/*
		 * id:订单id int
		 * condition:订单状态 int 0/待付款、1/待发货、2/待收货、3/待核销、4/待评价、5/已完成、6/已取消、7/已退款、8/无效、10或null表示全部订单
		 * ord_time:下单时间 string
		 * pay_time: 付款时间 string
		 * uid:购买用户id
		 * ord_money:下单金额 float
		 * ord_paytype:支付方式 string
		 * send_type:配送方式 string
		 * leave_msg:客户留言 string
		 * order_nums：订单编号 srting
		 * sid：商品id int
		 * s_spec:规格 string
		 * s_specNum:商品数量 int
		 *
		 */
		orders: [
      // {
      //   id:1,
      //   condition:0,
      //   ord_time:'2020-11-25 09:26:37',
      //   pay_time:'2020-11-25 09:27:37',
      //   uid:1,
      //   ord_money:'233.33',
      //   ord_paytype:'wepay',
      //   send_type:1,
      //   order_nums:'1988290188127',
      //   sid:2,
      //
      // },
      {
        id: 1,
        positionTitle: '仅限深圳同城包邮',
        showinfo: '新鲜水果上市 大荔冬枣 5斤/箱 枣香枣脆',
        specName: '箱',
        specNum: 22,
        Mymoney: 2333,
        orderNum: '1998101020202678',
        payState: '待付款',
        goodsPic: 'https://cdn4.buysellads.net/uu/1/3386/1525189943-38523.png',
        checkPic: 'https://tse3-mm.cn.bing.net/th/id/OIP.-4iKJTQIEhKnAGgGjHr3EQHaHc?w=209&h=210&c=7&o=5&pid=1.7',
        message: '',
        value: 0.5,
      },
      {
        id: 1,
        positionTitle: '仅限深圳同城包邮',
        showinfo: '新鲜水果上市 大荔冬枣 5斤/箱 枣香枣脆',
        specName: '箱',
        specNum: 22,
        Mymoney: 2333,
        orderNum: '1998101020202678',
        payState: '待付款',
        goodsPic: 'https://cdn4.buysellads.net/uu/1/3386/1525189943-38523.png',
        checkPic: 'https://tse3-mm.cn.bing.net/th/id/OIP.-4iKJTQIEhKnAGgGjHr3EQHaHc?w=209&h=210&c=7&o=5&pid=1.7',
        message: '',
        value: 0.5,
      },
      {
        id: 2,
        positionTitle: '非偏远地区包邮',
        showinfo: '大贝壳，好吃好好吃',
        specName: '盒',
        specNum: 22,
        Mymoney: 2333,
        orderNum: '1998101020202678',
        payState: '待成团',
        goodsPic: 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=2909747258,3377462521&fm=26&gp=0.jpg',
        checkPic: 'https://tse3-mm.cn.bing.net/th/id/OIP.-4iKJTQIEhKnAGgGjHr3EQHaHc?w=209&h=210&c=7&o=5&pid=1.7',
        message: '',
        value: 5,
      },
      {
        id: 3,
        positionTitle: '全国包邮',
        showinfo: '扬州炒饭，惊艳您的味蕾',
        specName: '碗',
        specNum: 22,
        Mymoney: 2333,
        orderNum: '1998101020202678',
        payState: '待核销',
        goodsPic: 'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=375845140,1625759192&fm=26&gp=0.jpg',
        checkPic: '',
        message: '',
        value: 3.5,
      },
      {
        id: 4,
        positionTitle: '成都限购！！',
        showinfo: '满汉全席，口水直流，值得拥有',
        specName: '台',
        specNum: 22,
        Mymoney: 2333,
        orderNum: '1998101020202678',
        payState: '待发货',
        goodsPic: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1233030547,2197034390&fm=26&gp=0.jpg',
        checkPic: 'https://tse3-mm.cn.bing.net/th/id/OIP.-4iKJTQIEhKnAGgGjHr3EQHaHc?w=209&h=210&c=7&o=5&pid=1.7',
        message: '',
        value: 4.5,
      },
      {
        id: 5,
        positionTitle: '农村饭菜！！',
        showinfo: '农村饭菜，香甜可口，值得拥有，入手不亏',
        specName: '桌',
        specNum: 22,
        Mymoney: 2333,
        orderNum: '1998101020202678',
        payState: '待收货',
        goodsPic: 'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=2780670623,2453990667&fm=26&gp=0.jpg',
        checkPic: 'https://tse3-mm.cn.bing.net/th/id/OIP.-4iKJTQIEhKnAGgGjHr3EQHaHc?w=209&h=210&c=7&o=5&pid=1.7',
        message: '',
        value: 3.5,
      },
      {
        id: 6,
        positionTitle: '天津人天天吃！！',
        showinfo: '大煎饼！一个管饱胀一天',
        specName: '个',
        specNum: 22,
        Mymoney: 2333,
        orderNum: '1998101020202678',
        payState: '待评价',
        goodsPic: 'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3654025998,17565898&fm=26&gp=0.jpg',
        checkPic: 'https://tse3-mm.cn.bing.net/th/id/OIP.-4iKJTQIEhKnAGgGjHr3EQHaHc?w=209&h=210&c=7&o=5&pid=1.7',
        message: '',
        value: 2,
      },
      {
        id: 7,
        positionTitle: '仅限深圳同城包邮',
        showinfo: '新鲜水果上市 大荔冬枣 5斤/箱 枣香枣脆',
        specName: '箱',
        specNum: 22,
        Mymoney: 2333,
        orderNum: '1998101020202678',
        payState: '待付款',
        goodsPic: 'https://cdn4.buysellads.net/uu/1/3386/1525189943-38523.png',
        checkPic: 'https://tse3-mm.cn.bing.net/th/id/OIP.-4iKJTQIEhKnAGgGjHr3EQHaHc?w=209&h=210&c=7&o=5&pid=1.7',
        message: '',
        value: 0.5,
      },
      {
        id: 8,
        positionTitle: '非偏远地区包邮',
        showinfo: '大贝壳，好吃好好吃',
        specName: '盒',
        specNum: 22,
        Mymoney: 2333,
        orderNum: '1998101020202678',
        payState: '待成团',
        goodsPic: 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=2909747258,3377462521&fm=26&gp=0.jpg',
        checkPic: 'https://tse3-mm.cn.bing.net/th/id/OIP.-4iKJTQIEhKnAGgGjHr3EQHaHc?w=209&h=210&c=7&o=5&pid=1.7',
        message: '',
        value: 5,
      },
      {
        id: 9,
        positionTitle: '全国包邮',
        showinfo: '扬州炒饭，惊艳您的味蕾',
        specName: '碗',
        specNum: 22,
        Mymoney: 2333,
        orderNum: '1998101020202678',
        payState: '待核销',
        goodsPic: 'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=375845140,1625759192&fm=26&gp=0.jpg',
        checkPic: 'https://tse3-mm.cn.bing.net/th/id/OIP.-4iKJTQIEhKnAGgGjHr3EQHaHc?w=209&h=210&c=7&o=5&pid=1.7',
        message: '',
        value: 3.5,
      },
      {
        id: 10,
        positionTitle: '成都限购！！',
        showinfo: '满汉全席，口水直流，值得拥有',
        specName: '台',
        specNum: 22,
        Mymoney: 2333,
        orderNum: '1998101020202678',
        payState: '待发货',
        goodsPic: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1233030547,2197034390&fm=26&gp=0.jpg',
        checkPic: 'https://tse3-mm.cn.bing.net/th/id/OIP.-4iKJTQIEhKnAGgGjHr3EQHaHc?w=209&h=210&c=7&o=5&pid=1.7',
        message: '',
        value: 4.5,
      },
      {
        id: 11,
        positionTitle: '农村饭菜！！',
        showinfo: '农村饭菜，香甜可口，值得拥有，入手不亏',
        specName: '桌',
        specNum: 22,
        Mymoney: 2333,
        orderNum: '1998101020202678',
        payState: '待收货',
        goodsPic: 'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=2780670623,2453990667&fm=26&gp=0.jpg',
        checkPic: 'https://tse3-mm.cn.bing.net/th/id/OIP.-4iKJTQIEhKnAGgGjHr3EQHaHc?w=209&h=210&c=7&o=5&pid=1.7',
        message: '',
        value: 3.5,
      },
      {
        id: 12,
        positionTitle: '天津人天天吃！！',
        showinfo: '大煎饼！一个管饱胀一天',
        specName: '个',
        specNum: 22,
        Mymoney: 2333,
        orderNum: '1998101020202678',
        payState: '待评价',
        goodsPic: 'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3654025998,17565898&fm=26&gp=0.jpg',
        checkPic: 'https://tse3-mm.cn.bing.net/th/id/OIP.-4iKJTQIEhKnAGgGjHr3EQHaHc?w=209&h=210&c=7&o=5&pid=1.7',
        message: '',
        value: 3.5,
      },
      {
        id: 13,
        positionTitle: '仅限深圳同城包邮',
        showinfo: '新鲜水果上市 大荔冬枣 5斤/箱 枣香枣脆',
        specName: '箱',
        specNum: 22,
        Mymoney: 2333,
        orderNum: '1998101020202678',
        payState: '待付款',
        goodsPic: 'https://cdn4.buysellads.net/uu/1/3386/1525189943-38523.png',
        checkPic: 'https://tse3-mm.cn.bing.net/th/id/OIP.-4iKJTQIEhKnAGgGjHr3EQHaHc?w=209&h=210&c=7&o=5&pid=1.7',
        message: '',
        value: 0.5,
      },
      {
        id: 14,
        positionTitle: '非偏远地区包邮',
        showinfo: '大贝壳，好吃好好吃',
        specName: '盒',
        specNum: 22,
        Mymoney: 2333,
        orderNum: '1998101020202678',
        payState: '待成团',
        goodsPic: 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=2909747258,3377462521&fm=26&gp=0.jpg',
        checkPic: 'https://tse3-mm.cn.bing.net/th/id/OIP.-4iKJTQIEhKnAGgGjHr3EQHaHc?w=209&h=210&c=7&o=5&pid=1.7',
        message: '',
        value: 5,
      },
      {
        id: 15,
        positionTitle: '全国包邮',
        showinfo: '扬州炒饭，惊艳您的味蕾',
        specName: '碗',
        specNum: 22,
        Mymoney: 2333,
        orderNum: '1998101020202678',
        payState: '待核销',
        goodsPic: 'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=375845140,1625759192&fm=26&gp=0.jpg',
        checkPic: '',
        message: '',
        value: 3.5,
      },
      {
        id: 16,
        positionTitle: '成都限购！！',
        showinfo: '满汉全席，口水直流，值得拥有',
        specName: '台',
        specNum: 22,
        Mymoney: 2333,
        orderNum: '1998101020202678',
        payState: '待发货',
        goodsPic: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1233030547,2197034390&fm=26&gp=0.jpg',
        checkPic: 'https://tse3-mm.cn.bing.net/th/id/OIP.-4iKJTQIEhKnAGgGjHr3EQHaHc?w=209&h=210&c=7&o=5&pid=1.7',
        message: '',
        value: 4.5,
      },
      {
        id: 17,
        positionTitle: '农村饭菜！！',
        showinfo: '农村饭菜，香甜可口，值得拥有，入手不亏',
        specName: '桌',
        specNum: 22,
        Mymoney: 2333,
        orderNum: '1998101020202678',
        payState: '待收货',
        goodsPic: 'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=2780670623,2453990667&fm=26&gp=0.jpg',
        checkPic: 'https://tse3-mm.cn.bing.net/th/id/OIP.-4iKJTQIEhKnAGgGjHr3EQHaHc?w=209&h=210&c=7&o=5&pid=1.7',
        message: '',
        value: 3.5,
      },
      {
        id: 18,
        positionTitle: '天津人天天吃！！',
        showinfo: '大煎饼！一个管饱胀一天',
        specName: '个',
        specNum: 22,
        Mymoney: 2333,
        orderNum: '1998101020202678',
        payState: '待评价',
        goodsPic: 'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3654025998,17565898&fm=26&gp=0.jpg',
        checkPic: 'https://tse3-mm.cn.bing.net/th/id/OIP.-4iKJTQIEhKnAGgGjHr3EQHaHc?w=209&h=210&c=7&o=5&pid=1.7',
        message: '',
        value: 2,
      },
      {
        id: 19,
        positionTitle: '仅限深圳同城包邮',
        showinfo: '新鲜水果上市 大荔冬枣 5斤/箱 枣香枣脆',
        specName: '箱',
        specNum: 22,
        Mymoney: 2333,
        orderNum: '1998101020202678',
        payState: '待付款',
        goodsPic: 'https://cdn4.buysellads.net/uu/1/3386/1525189943-38523.png',
        checkPic: 'https://tse3-mm.cn.bing.net/th/id/OIP.-4iKJTQIEhKnAGgGjHr3EQHaHc?w=209&h=210&c=7&o=5&pid=1.7',
        message: '',
        value: 0.5,
      },
      {
        id: 20,
        positionTitle: '非偏远地区包邮',
        showinfo: '大贝壳，好吃好好吃',
        specName: '盒',
        specNum: 22,
        Mymoney: 2333,
        orderNum: '1998101020202678',
        payState: '待成团',
        goodsPic: 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=2909747258,3377462521&fm=26&gp=0.jpg',
        checkPic: 'https://tse3-mm.cn.bing.net/th/id/OIP.-4iKJTQIEhKnAGgGjHr3EQHaHc?w=209&h=210&c=7&o=5&pid=1.7',
        message: '',
        value: 5,
      },
      {
        id: 21,
        positionTitle: '全国包邮',
        showinfo: '扬州炒饭，惊艳您的味蕾',
        specName: '碗',
        specNum: 22,
        Mymoney: 2333,
        orderNum: '1998101020202678',
        payState: '待核销',
        goodsPic: 'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=375845140,1625759192&fm=26&gp=0.jpg',
        checkPic: 'https://tse3-mm.cn.bing.net/th/id/OIP.-4iKJTQIEhKnAGgGjHr3EQHaHc?w=209&h=210&c=7&o=5&pid=1.7',
        message: '',
        value: 3.5,
      },
      {
        id: 22,
        positionTitle: '成都限购！！',
        showinfo: '满汉全席，口水直流，值得拥有',
        specName: '台',
        specNum: 22,
        Mymoney: 2333,
        orderNum: '1998101020202678',
        payState: '待发货',
        goodsPic: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1233030547,2197034390&fm=26&gp=0.jpg',
        checkPic: 'https://tse3-mm.cn.bing.net/th/id/OIP.-4iKJTQIEhKnAGgGjHr3EQHaHc?w=209&h=210&c=7&o=5&pid=1.7',
        message: '',
        value: 4.5,
      },
      {
        id: 23,
        positionTitle: '农村饭菜！！',
        showinfo: '农村饭菜，香甜可口，值得拥有，入手不亏',
        specName: '桌',
        specNum: 22,
        Mymoney: 2333,
        orderNum: '1998101020202678',
        payState: '待收货',
        goodsPic: 'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=2780670623,2453990667&fm=26&gp=0.jpg',
        checkPic: 'https://tse3-mm.cn.bing.net/th/id/OIP.-4iKJTQIEhKnAGgGjHr3EQHaHc?w=209&h=210&c=7&o=5&pid=1.7',
        message: '',
        value: 3.5,
      },
      {
        id: 24,
        positionTitle: '天津人天天吃！！',
        showinfo: '大煎饼！一个管饱胀一天',
        specName: '个',
        specNum: 22,
        Mymoney: 2333,
        orderNum: '1998101020202678',
        payState: '待评价',
        goodsPic: 'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3654025998,17565898&fm=26&gp=0.jpg',
        checkPic: 'https://tse3-mm.cn.bing.net/th/id/OIP.-4iKJTQIEhKnAGgGjHr3EQHaHc?w=209&h=210&c=7&o=5&pid=1.7',
        message: '',
        value: 3.5,
      },
    ],

		// 地址表
		/*
		 * id: 地址id
		 * uid: 用户id
		 * location: 地址
		 */
		address: [{
			id: 1,
			uid: 1,
			location: '四川省成都市锦江区'
		}],

		// 收货表
		/*
		 * id:收货id
		 * uid:用户id
		 * oid:订单id
		 */
		recieve: [],

		// 优惠券
		/*
		 * id: 优惠券id
		 * cou_money: 优惠金额
		 * condition:优惠条件
		 * end_time:有效期
		 * name: 优惠券名称
		 * status:状态 0-未使用 1-已使用 -1-已过期
		 */
		coupon: [{
				id: 1,
				cou_money: 5,
				condition: '满50元可用',
				end_time: '2017-06-14 至 2017-06-21',
				name: '关注5元券',
				status: 0
			},
			{
				id: 2,
				cou_money: 5,
				condition: '满50元可用',
				end_time: '2017-06-14 至 2017-06-21',
				name: '优惠券名称',
				status: 1
			},
			{
				id: 3,
				cou_money: 5,
				condition: '满50元可用',
				end_time: '2017-06-14 至 2017-06-21',
				name: '优惠券名称',
				status: 2
			},

		],

		// 拼团
		/*
		 * id:拼团id
		 * sid:商品id
		 * g_type:拼团类型
		 * g_price:拼团价格
		 * g_condition:拼团状态 0-拼团中 1-已成功 -1-失败
		 *
		 */
		group: [{
				id: 1,
				sid: 1,
				g_type: '2-4人团',
				g_price: 2199,
				g_condition: 0
			},
			{
				id: 2,
				sid: 2,
				g_type: '4人团',
				g_price: 2099,
				g_condition: 1
			},
			{
				id: 3,
				sid: 3,
				g_type: '3人团',
				g_price: 5499,
				g_condition: 0
			}
		],

		// 收藏
		/*
		 * id:收藏id
		 * uid:用户id
		 * gid:拼团id
		 */
		collection: [{
				id: 1,
				uid: 1,
				gid: 1,
				sid:1
			},
			{
				id: 2,
				uid: 1,
				gid: 2,
				sid:2
			},
			{
				id: 3,
				uid: 1,
				gid: 2,
				sid:2
			},
		],
		//查询结果
		res: ""
	},
	mutations: {
		// 设置登录用户
		setLoginUser(state, prop) {
			state.curLoginUser = prop.curUser;
		},
		// 查询
		/*
		 * condition:查询条件
		 * 	1.formName:表名 2. id:查询的id
		 * 返回值：用户id等于参数id的数组
		 */
		selectById(state, condition) {

			let res = state[condition.formName].filter((item) => {
				return item.id === condition.id;
			})
			state.res = res;
		},
		//增加
		/*
		 * condition:查询条件
		 * 	1.formName:表名 2. obj:添加的对象
		 * 返回值：boolean 判断是否添加成功
		 */
		add(state, condition) {
			if (condition.obj === null) {
				return false;
			} else {
				state[condition.formName].push(condition.obj);
				return true;
			}
		},
		// 删除
		/*
		 * condition:查询条件
		 * 	1.formName:表名 2. id:删除的id
		 * 返回值：包含当前删除的元素的数组
		 */
		delById(state, condition) {
			let res = state[condition.formName].filter((item) => {
				return item.id === condition.id;
			})

			for (let i = 0; i < state[condition.formName].length; i++) {
				if (state[condition.formName][i].id === condition.id) {
					state[condition.formName].splice(i, 1);
					break;
				}
			}

			return res.length !== 0;
		},
		changeInte(state,abc){
		  state.curLoginUser.points-=abc;
    }
	},
	getters: {

	},
	actions: {

	},
	modules: {
		xuzhaofei
	}
})
